//=============================================================================
#include "CApp.h"

//=============================================================================
CApp::CApp() {
    Surf_Display    = NULL;

    Running         = true;

    Player          = 0;
}

//------------------------------------------------------------------------------
int CApp::OnExecute() {
    if(OnInit() == false) {
        return -1;
    }

    SDL_Event Event;

    //Game loop
    while(Running) {
        while(FE_PollEvent(&Event)) {
            OnEvent(&Event);
        }

        OnLoop();

        SDL_Delay(0);
    }

    OnCleanup();

    return 0;
}

//=============================================================================
int main(int argc, char* argv[]) {
    CApp theApp;

    return theApp.OnExecute();
}

//=============================================================================
